<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="./js/vue.js"></script>
</head>
<body>
    <div id="app">
        <a v-bind:href="her">百度</a>
        <img :src="url" alt="">

        <button v-on:click="show">按钮</button>
        <button @click="show">按钮2</button>
        <button @click="text1('ok',$event)">按钮3</button>

        <div @click="text2">
            <button @click="text3">按钮4</button>
            <button @click.stop="text4">按钮5</button>
        </div>
    
        <form @click="text2">
            <input type="text">
            <button @click.stop.prevent="text3">提交1</button>
            <button @click="text3">提交2</button>

        </form>
    </div>
    <script>
    new Vue({
        el:"#app",
        data:{
            her:"https://www.baidu.com/",
            url:"https://ss0.baidu.com/6ONWsjip0QIZ8tyhnq/it/u=1093148145,4046486309&fm=179&app=42&f=JPEG?w=121&h=121",
            msg:"你好"
        },
        methods:{
            show(){
                alert("hello world")
            },
            text1(e,evt){
                console.log(e,evt)
            },
            text2(){
                alert("111")
            },
            text3(){
                alert("111")
            },
            text4(){
                alert("333")
            }
        }
    })
    
        
    </script>
    
</body>
</html>